package com.jvm.classfile.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
 * @program: diy_simple_jvm
 * @description:
 * @author: CaoYong
 * @create: 2021-07-08 14:20
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ClassFile {

    U4 magic; //魔数
    U2 minorVersion;
    U2 majorVersion;
    U2 constantPoolCount; //常量池大小
    CpInfo[] constantPool; //常量池
    U2 accessFlags; //访问标志
    U2 thisClass; //当前类名索引
    U2 superClass; //父类类名索引
    U2 interfacesCount; //接口数
    U2[] interfaces; //接口
    U2 fieldsCount; //字段数
    FieldInfo[] fields; //字段
    U2 methodsCount; //方法数
    MethodInfo[] methods;// 方法
    U2 attributesCount; //属性数
    AttributeInfo[] attributes; //属性
}
